home *** CD-ROM | disk | FTP | other *** search
/ Aminet 8 / Aminet 8 (1995)(GTI - Schatztruhe)[!][Oct 1995].iso / Aminet / dev / misc / HWGRCSmanp12f.lha / HWGRCS / hwgrcs / man / rcsintro.man < prev    next >
Text File  |  1993-01-19  |  11KB  |  331 lines

  1.  
  2.  
  3.  
  4. RCSINTRO(1)              USER COMMANDS                RCSINTRO(1)
  5.  
  6.  
  7.  
  8. NAME
  9.      rcsintro - introduction to RCS commands
  10.  
  11. DESCRIPTION
  12.      The Revision Control System (RCS) manages multiple revisions
  13.      of  files.   RCS  automates the storing, retrieval, logging,
  14.      identification, and merging of revisions.  RCS is useful for
  15.      text that is revised frequently, for example programs, docu-
  16.      mentation, graphics, papers, and form letters.
  17.  
  18.      The basic user interface is extremely  simple.   The  novice
  19.      only  needs  to  learn  two  commands: ci(1) and co(1).  ci,
  20.      short for "check in", deposits the contents of a  file  into
  21.      an  archival  file called an RCS file.  An RCS file contains
  22.      all revisions of a particular file.  co,  short  for  "check
  23.      out", retrieves revisions from an RCS file.
  24.  
  25.   Functions of RCS
  26.      o+    Store and retrieve multiple  revisions  of  text.   RCS
  27.           saves  all  old  revisions  in  a  space efficient way.
  28.           Changes no longer destroy  the  original,  because  the
  29.           previous revisions remain accessible.  Revisions can be
  30.           retrieved according to ranges of revision numbers, sym-
  31.           bolic names, dates, authors, and states.
  32.  
  33.      o+    Maintain a complete history of changes.  RCS  logs  all
  34.           changes  automatically.  Besides the text of each revi-
  35.           sion, RCS stores the  author,  the  date  and  time  of
  36.           check-in,  and  a  log  message summarizing the change.
  37.           The logging makes it easy to find out what happened  to
  38.           a  module, without having to compare source listings or
  39.           having to track down colleagues.
  40.  
  41.      o+    Resolve access conflicts.  When two or more programmers
  42.           wish  to  modify the same revision, RCS alerts the pro-
  43.           grammers and prevents one modification from  corrupting
  44.           the other.
  45.  
  46.      o+    Maintain  a  tree  of  revisions.   RCS  can   maintain
  47.           separate  lines  of  development  for  each module.  It
  48.           stores a tree structure that represents  the  ancestral
  49.           relationships among revisions.
  50.  
  51.      o+    Merge revisions and resolve  conflicts.   Two  separate
  52.           lines  of  development  of a module can be coalesced by
  53.           merging.  If the revisions to be merged affect the same
  54.           sections  of  code, RCS alerts the user about the over-
  55.           lapping changes.
  56.  
  57.      o+    Control releases and configurations.  Revisions can  be
  58.           assigned symbolic names and marked as released, stable,
  59.           experimental,    etc.     With    these     facilities,
  60.  
  61.  
  62.  
  63. GNU                  Last change: 1991/04/21                    1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. RCSINTRO(1)              USER COMMANDS                RCSINTRO(1)
  71.  
  72.  
  73.  
  74.           configurations  of  modules can be described simply and
  75.           directly.
  76.  
  77.      o+    Automatically identify each revision with  name,  revi-
  78.           sion number, creation time, author, etc.  The identifi-
  79.           cation is like a stamp  that  can  be  embedded  at  an
  80.           appropriate place in the text of a revision.  The iden-
  81.           tification makes it simple to determine which revisions
  82.           of which modules make up a given configuration.
  83.  
  84.      o+    Minimize secondary storage.   RCS  needs  little  extra
  85.           space  for  the  revisions  (only the differences).  If
  86.           intermediate revisions are deleted,  the  corresponding
  87.           deltas are compressed accordingly.
  88.  
  89.   Getting Started with RCS
  90.      Suppose you have a file f.c that you wish to put under  con-
  91.      trol  of  RCS.  If you have not already done so, make an RCS
  92.      directory with the command
  93.  
  94.           mkdir  RCS
  95.  
  96.      Then invoke the check-in command
  97.  
  98.           ci  f.c
  99.  
  100.      This command creates an  RCS  file  in  the  RCS  directory,
  101.      stores  f.c  into  it  as revision 1.1, and deletes f.c.  It
  102.      also asks you for a description.  The description should  be
  103.      a  synopsis of the contents of the file.  All later check-in
  104.      commands will ask you for a log entry, which should  summar-
  105.      ize the changes that you made.
  106.  
  107.      Files in the RCS directory are called RCS files; the  others
  108.      are  called working files.  To get back the working file f.c
  109.      in the previous example, use the check-out command
  110.  
  111.           co  f.c
  112.  
  113.      This command extracts the latest revision from the RCS  file
  114.      and  writes  it into f.c.  If you want to edit f.c, you must
  115.      lock it as you check it out with the command
  116.  
  117.           co  -l  f.c
  118.  
  119.      You can now edit f.c.
  120.  
  121.      Suppose after some editing you want  to  know  what  changes
  122.      that you have made.  The command
  123.  
  124.           rcsdiff  f.c
  125.  
  126.  
  127.  
  128.  
  129. GNU                  Last change: 1991/04/21                    2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. RCSINTRO(1)              USER COMMANDS                RCSINTRO(1)
  137.  
  138.  
  139.  
  140.      tells you the difference between the most recently  checked-
  141.      in  version  and  the  working file.  You can check the file
  142.      back in by invoking
  143.  
  144.           ci  f.c
  145.  
  146.      This increments the revision number properly.
  147.  
  148.      If ci complains with the message
  149.  
  150.           ci error: no lock set by _y_o_u_r _n_a_m_e
  151.  
  152.      then you have tried to check in a file even though  you  did
  153.      not  lock  it when you checked it out.  Of course, it is too
  154.      late now to do the check-out with locking,  because  another
  155.      check-out  would  overwrite  your  modifications.   Instead,
  156.      invoke
  157.  
  158.           rcs  -l  f.c
  159.  
  160.      This command will lock the latest revision for  you,  unless
  161.      somebody  else  got  ahead  of  you  already.  In this case,
  162.      you'll have to negotiate with that person.
  163.  
  164.      Locking assures that you, and only you,  can  check  in  the
  165.      next  update,  and  avoids  nasty problems if several people
  166.      work on the same file.  Even if a revision is locked, it can
  167.      still  be checked out for reading, compiling, etc.  All that
  168.      locking prevents is a _c_h_e_c_k-_i_n by anybody but the locker.
  169.  
  170.      If your RCS file is private, i.e., if you are the only  per-
  171.      son  who is going to deposit revisions into it, strict lock-
  172.      ing is not needed and you can turn it off.  If strict  lock-
  173.      ing is turned off, the owner of the RCS file need not have a
  174.      lock for check-in; all  others  still  do.   Turning  strict
  175.      locking off and on is done with the commands
  176.  
  177.           rcs  -U  f.c     and     rcs  -L  f.c
  178.  
  179.      If you don't want to clutter your working directory with RCS
  180.      files,  create  a  subdirectory  called  RCS in your working
  181.      directory, and move all your RCS files there.  RCS  commands
  182.      will  look  first  into that directory to find needed files.
  183.      All the commands discussed above will  still  work,  without
  184.      any modification.  (Actually, pairs of RCS and working files
  185.      can be specified in three ways: (a) both are given, (b) only
  186.      the  working  file is given, (c) only the RCS file is given.
  187.      Both RCS and working files may have arbitrary path prefixes;
  188.      RCS commands pair them up intelligently.)
  189.  
  190.      To avoid the deletion of the working  file  during  check-in
  191.      (in case you want to continue editing or compiling), invoke
  192.  
  193.  
  194.  
  195. GNU                  Last change: 1991/04/21                    3
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. RCSINTRO(1)              USER COMMANDS                RCSINTRO(1)
  203.  
  204.  
  205.  
  206.           ci  -l  f.c     or     ci  -u  f.c
  207.  
  208.      These commands check in f.c as usual, but perform an  impli-
  209.      cit  check-out.   The  first  form also locks the checked in
  210.      revision, the second one doesn't.  Thus, these options  save
  211.      you  one  check-out  operation.  The first form is useful if
  212.      you want to continue editing, the second  one  if  you  just
  213.      want to read the file.  Both update the identification mark-
  214.      ers in your working file (see below).
  215.  
  216.      You can give ci the number you want assigned to a checked in
  217.      revision.  Assume all your revisions were numbered 1.1, 1.2,
  218.      1.3, etc., and you would like to start release 2.  The  com-
  219.      mand
  220.  
  221.           ci  -r2  f.c     or     ci  -r2.1  f.c
  222.  
  223.      assigns the number 2.1 to the new revision.  From  then  on,
  224.      ci  will number the subsequent revisions with 2.2, 2.3, etc.
  225.      The corresponding co commands
  226.  
  227.           co  -r2  f.c     and     co  -r2.1  f.c
  228.  
  229.      retrieve the latest revision numbered 2._x and  the  revision
  230.      2.1, respectively.  co without a revision number selects the
  231.      latest revision on the _t_r_u_n_k, i.e. the highest revision with
  232.      a  number  consisting of two fields.  Numbers with more than
  233.      two fields are needed for branches.  For example, to start a
  234.      branch at revision 1.3, invoke
  235.  
  236.           ci  -r1.3.1  f.c
  237.  
  238.      This command starts a branch numbered 1 at revision 1.3, and
  239.      assigns  the  number  1.3.1.1 to the new revision.  For more
  240.      information about branches, see rcsfile(5).
  241.  
  242.   Automatic Identification
  243.      RCS can put special strings  for  identification  into  your
  244.      source  and  object  code.   To  obtain such identification,
  245.      place the marker
  246.  
  247.           $Id$
  248.  
  249.      into your text, for instance inside  a  comment.   RCS  will
  250.      replace this marker with a string of the form
  251.  
  252.           $Id:  _f_i_l_e_n_a_m_e  _r_e_v_i_s_i_o_n  _d_a_t_e  _t_i_m_e  _a_u_t_h_o_r  _s_t_a_t_e  $
  253.  
  254.      With such a marker on the first page of each module, you can
  255.      always  see  with which revision you are working.  RCS keeps
  256.      the markers up to  date  automatically.   To  propagate  the
  257.      markers  into your object code, simply put them into literal
  258.  
  259.  
  260.  
  261. GNU                  Last change: 1991/04/21                    4
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. RCSINTRO(1)              USER COMMANDS                RCSINTRO(1)
  269.  
  270.  
  271.  
  272.      character strings.  In C, this is done as follows:
  273.  
  274.           static char rcsid[] = "$Id$";
  275.  
  276.      The command ident extracts such markers from any file,  even
  277.      object  code and dumps.  Thus, ident lets you find out which
  278.      revisions of which modules were used in a given program.
  279.  
  280.      You may also find it useful to put  the  marker  $Log$  into
  281.      your  text,  inside  a comment.  This marker accumulates the
  282.      log messages that are requested during check-in.  Thus,  you
  283.      can  maintain  the  complete  history  of your file directly
  284.      inside it.   There  are  several  additional  identification
  285.      markers; see co(1) for details.
  286.  
  287. IDENTIFICATION
  288.      Author: Walter F. Tichy.
  289.      Revision Number: 5.1; Release Date: 1991/04/21.
  290.      Copyright c 1982, 1988, 1989 by Walter F. Tichy.
  291.      Copyright c 1990, 1991 by Paul Eggert.
  292.  
  293. SEE ALSO
  294.      ci(1), co(1),  ident(1),  rcs(1),  rcsdiff(1),  rcsintro(1),
  295.      rcsmerge(1), rlog(1)
  296.      Walter  F.  Tichy,  RCS--A  System  for   Version   Control,
  297.      _S_o_f_t_w_a_r_e--_P_r_a_c_t_i_c_e & _E_x_p_e_r_i_e_n_c_e 15, 7 (July 1985), 637-654.
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327. GNU                  Last change: 1991/04/21                    5
  328.  
  329.  
  330.  
  331.